package com.example.freshfoodproject.service.impl;

import com.example.freshfoodproject.entry.Delivery;
import com.example.freshfoodproject.mapper.DeliveryMapper;
import com.example.freshfoodproject.service.DeliveryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class DeliveryServiceImpl implements DeliveryService {
    @Autowired
    private DeliveryMapper deliveryMapper;
    @Override
    public List<Delivery> findAll() {
        return deliveryMapper.selectAll();
    }

    @Override
    public boolean addDelivery(Delivery delivery) {
        return deliveryMapper.insertDelivery(delivery)==1?true:false;
    }
}
